package org.yefei.homeworkday03;

import java.util.Scanner;

public class ThreeNum {

	public static void main(String[] args) {
		// 2:输入三个数，从小到大的方式输出三个数
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入第一个数：");
		double num1 = sc.nextDouble();
		System.out.println("请输入第二个数：");
		double num2 = sc.nextDouble();
		System.out.println("请输入第三个数：");
		double num3 = sc.nextDouble();
		if (num1 >= num2 && num2 >= num3) {
			System.out.println("num3=" + num3 + "," + "num2=" + num2 + "," + "num1=" + num1);
		} else if (num1 >= num3 && num3 >= num2) {
			System.out.println("num2=" + num2 + "," + "num3=" + num3 + "," + "num1=" + num1);
		} else if (num2 >= num1 && num1 >= num3) {
			System.out.println("num3=" + num3 + "," + "num1=" + num1 + "," + "num2=" + num2);
		} else if (num2 >= num3 && num3 >= num1) {
			System.out.println("num1=" + num1 + "," + "num3=" + num3 + "," + "num2=" + num2);
		} else if (num3 >= num2 && num2 >= num1) {
			System.out.println("num1=" + num1 + "," + "num2=" + num2 + "," + "num3=" + num3);
		} else if (num3 >= num1 && num1 >= num2) {
			System.out.println("num2=" + num2 + "," + "num1=" + num1 + "," + "num3=" + num3);
		} else {
			System.out.println("情况不存在！");
		}
	}

}
